﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using XQ.SP.Common;

namespace System
{
    public class EnumToList
    {
        #region 状态
        /// <summary>
        /// 状态
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListStutus()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm=new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EnumStatus>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion


        #region 性别
        /// <summary>
        /// 性别
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListSex()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmUserSex>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region 用户认证
        /// <summary>
        /// 用户认证
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListUserAttest()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmUserAttest>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region 交易方式
        /// <summary>
        /// 交易方式
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListSaleTransactions()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmSaleTransactions>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region 产品信息状态
        /// <summary>
        /// 产品信息状态
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListProduceState()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmShopProduceState>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region /// 已售产品状态
        /// <summary>
        /// 已售产品状态
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListShopOrdersProduceState()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmShopOrdersProduceState>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region 信息推送类型
        /// <summary>
        /// 信息推送类型
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListMessNoticeType()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmMessNoticeType>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion

        #region 信息推送状态
        /// <summary>
        /// 信息推送状态
        /// </summary>
        /// <returns></returns>
        public List<SelectListItem> EnumListMessNoticeState()
        {
            List<SelectListItem> list = new List<SelectListItem>();
            XQ.SP.Common.EnumToListComm comm = new XQ.SP.Common.EnumToListComm();
            var listEnumList = comm.EnumToList<EunmMessNoticeState>();
            foreach (var item in listEnumList)
            {
                list.Add(new SelectListItem { Value = item.Value, Text = item.Text });
            }
            return list;
        }
        #endregion
    }

}


